import cv2 as cv
import numpy as np
import argparse
import imutils

ap = argparse.ArgumentParser()
ap.add_argument("-i", "--image", required=True, help="The Path To Image")
args = vars(ap.parse_args())

image = cv.imread(args["image"])
flipped = cv.flip(image, 1)
B, G, R = flipped[235, 259]
print("R = {r}, G = {g}, B = {b}".format(r=R, g=G, b=B))

flipped = cv.flip(image, 1)
centerA = flipped.shape[1] / 2, flipped.shape[0] / 2
M = cv.getRotationMatrix2D(centerA, 45, 1.0)
# rotated = imutils.rotate(flipped, 45)
rotated = cv.warpAffine(flipped, M, (flipped.shape[1], flipped.shape[0]))
flipped = cv.flip(rotated, 0)
B, G, R = flipped[189, 441]
print("R = {r}, G = {g}, B = {b}".format(r=R, g=G, b=B))
